#!/usr/bin/env ruby
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
# frozen_string_literal: true

require 'yaml'
require_relative "#{ENV['CCI_SRC']}/lib/es_client"
require_relative "#{ENV['CCI_SRC']}/lib/build_account_info"

content = YAML.load_file('/etc/compass-ci/register/register.yaml')
content.each do |_key, value|
  my_info = {}
  my_info['my_email'] = value['my_email']
  my_info['my_name'] = value['my_name']
  my_info['my_account'] = value['my_account']
  my_info['lab'] = ENV['lab']

  build_account_info(my_info)
end
sleep
